-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add astro support #360
Add astro support #360
Conversation
Fantastic! Would you also be able to add a sample to the |
@all-contributors add @EliasLeguizamon123 for data |
I've put up a pull request to add @EliasLeguizamon123! 🎉 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
==========================================
- Coverage 78.29% 75.73% -2.56%
==========================================
Files 17 17
Lines 516 474 -42
==========================================
- Hits 404 359 -45
- Misses 112 115 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Hi @spenserblack, I've been looking through the samples folder and the documentation, but I'm unsure about what kind of sample I could add. |
The sample can be anything, it just has to be a good representation of the language. For example, if I was making a Python sample: Not a good sampleprint("Hello, World!") A better samplefrom uuid import uuid4
from unittest import TestCase
class Item:
def __init__(self):
self.id = uuid4()
class Charcoal(Item):
pass
class Stick(Item):
def __add__(self, other):
return Torch(self, other)
class Torch(Item):
def __init__(self, stick: Stick, charcoal: Charcoal):
super().__init__()
self.stick = stick
self.charcoal = charcoal
def components(self):
return [self.stick, self.charcoal]
class TestMinecraft(TestCase):
def test_torch(self):
stick = Stick()
charcoal = Charcoal()
torch = stick + charcoal
components = torch.components()
self.assertIn(charcoal, components)
self.assertIn(stick, components) The second example is better because it showcases language features, like imports, classes, and methods. Right now the samples serve one purpose: to run tests to prove that But in the future the samples may be used to train a classifier, which is why the samples should be more than a "hello world" and contain significant syntax. Hope this helps! Also, feel free to make a PR to update the docs if they weren't clear enough 🙂 |
Sure mate, count on me. Give me a couple of days to finish some personal projects, and I'll add an example for Astro in a new PR 😄 @spenserblack |
Thanks! |
This PR add astro support: https://astro.build
Mentioned in #34